package com.micmac.main.mainmodel.service
{
	
	/*
	
	Author : Roy Raul.
	
	Component : StyleSheetService.             
	
	Version History         : 0.1 Date Jul-20-2011
	
	Current Version         : 0.1 Date Jul-20-2011
	
	Build Date              : Jul-20-2011
	
	*/
	
	
	import com.micmac.main.interfaces.IStartupService;
	import com.micmac.main.interfaces.IStartupStylesheet;
	import com.micmac.main.mainmodel.interfaces.IStartupModel;
	
	import mx.rpc.IResponder;
	import mx.styles.StyleManager;
	
	import org.robotlegs.mvcs.Actor;
	
	

	public class StyleSheetService extends Actor implements IStartupStylesheet
	{
		[Inject]
		public var startupMonitorModel:IStartupModel;
		
		[Inject]
		public var configService:IStartupService;
		private var data:Object;
		
		public function register():void
		{
			startupMonitorModel.addResource( this , true );
		}
		
		public function load():void{
			
			var styleURL:String =  "assets/css/"+ configService.getValue('styleSheetName');
			this.data = new Object();
			//StyleManager.loadStyleDeclarations(styleURL);
			startupMonitorModel.resourceComplete( this );
			// create a worker who will go get some data
			// pass it a reference to this proxy so the delegate knows where to return the data
		}
		
		/**
		 * Get the localized text
		 * 
		 * @param key the key to read 
		 * @return String the text value stored in internal object
		 */
		
	}
}